package com.atguigu.fruit.service;

import com.atguigu.fruit.pojo.Fruit;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.awt.print.Book;
import java.util.List;

/**
* @author Administrator
* @description 针对表【t_fruit】的数据库操作Service
* @createDate 2022-04-29 17:48:51
*/
public interface FruitService extends IService<Fruit> {

    /**
     * 新增
     * @param fruit
     * @return
     */
    boolean insertSelective(Fruit fruit);

    /**
     * 修改
     * @param fruit
     * @return
     */

    boolean updateSelectiveById(Fruit fruit);


    /**
     * 删除
     * @param fid
     * @return
     */
    boolean deleteByFid(@Param("fid") Integer fid);

    /**
     * 按id查询
     * @param fid
     * @return
     */

    List<Fruit> selectByFid(@Param("fid") Integer fid);

    /**
     * 查询全部
     * @param
     * @return
     */

    List<Fruit> searchAll();


//    IPage<Fruit> getPage(int currentPage, int pageSize);

    IPage<Fruit> getPage(int currentPage, int pageSize, Fruit fruit);
}
